package com.liusand.controller;

import com.liusand.common.Result;
import com.liusand.service.DishService;
import com.liusand.vo.ClientDishVo;
import com.liusand.vo.DishFlavorsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author :liusha
 * packageName :com.liusand.controller
 * fileName :DishController
 * creationTime :2022/12/1 21:22
 */
@RestController
@RequestMapping("dish")
public class DishController {
    @Autowired
    private DishService dishService;

    @GetMapping("list")
    public Result list(String categoryId,
                       Integer status){
        List<ClientDishVo> clientDishVo = dishService.clientList(categoryId, status);
        return Result.success(clientDishVo);
    }
}
